package com.weiqiao.mall.repository;

import com.weiqiao.base.dao.IBaseMongoDao;
import org.bson.conversions.Bson;
import org.springframework.data.domain.Pageable;

import java.util.List;

/**
 * 商品日志repository层
 *
 * @author PENGLIWEI
 * @createDate 2019-10-24
 */
public interface ICommodityLogRepository extends IBaseMongoDao {

    /**
     * 商品操作实体
     *
     * @param jsons
     * @return
     */
    boolean addCommodityLog(String jsons);

    /**
     * 分页查询功能优化
     */
    List<String> getCommodityLogList(Bson doc, Pageable pageable);

    /**
     * 统计总数
     *
     * @param filter
     * @return
     */
    int getCommodityLogCount(int company_id, Bson filter);
}
